home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Complete Linux
/
Complete Linux.iso
/
docs
/
apps
/
database
/
postgres
/
postgre1.z
/
postgre1
/
demo
/
boxarea.c
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
Text File
|
1992-08-27
|
267 b
|
19 lines
typedef struct {
double xh, yh, xl, yl; /* high and low coords */
} BOX;
#define ABS(X) ((X) > 0 ? (X) : -(X))
int
boxarea(box)
BOX *box;
{
int width, height;
width = ABS(box->xh - box->xl);
height = ABS(box->yh - box->yl);
return (width * height);
}